package a.f.h;

import a.a.kb;
import a.c.m;
import a.c.n;
import a.c.w;
import a.c.x;
import a.f.*;
import a.f.h.d.r;
import a.f.h.e.d;
import a.f.n.jb;

public class j
  extends mb
{
  private static final Object w = "y.layout.orthogonal.OrthogonalLayouter.INCREMENTAL_NODES_DPKEY";
  private static final Object x = "y.layout.orthogonal.OrthogonalLayouter.INCREMENTAL_EDGES_DPKEY";
  public static final Object y = "y.layout.orthogonal.OrthogonalLayouter.EDGE_LAYOUT_DESCRIPTOR_DPKEY";
  public static final byte z = 0;
  public static final byte A = 1;
  public static final byte B = 2;
  public static final byte C = 3;
  public static final byte D = 4;
  public static final byte E = 5;
  public static final byte F = 6;
  private int G = 0;
  private int H = 25;
  private boolean I = true;
  private boolean J = true;
  private boolean K = true;
  private boolean L = false;
  private boolean M = false;
  public static final int N = 0;
  public static final int O = 1;
  private int P = 0;
  private boolean Q;
  private boolean R;
  private boolean S = false;
  private boolean T = false;
  private vc U = new pc();
  private k V;
  public static boolean W;
  
  public void a(int paramInt)
  {
    int i = k.g;
    if ((i != 0) || (paramInt >= 0))
    {
      if (i != 0) {
        break label50;
      }
      if (paramInt <= 6) {}
    }
    else
    {
      throw new IllegalArgumentException("Illegal value for node model: " + paramInt);
    }
    label50:
    if (i == 0) {
      if (paramInt == 0)
      {
        c(0);
        if (i != 0) {
          return;
        }
        if (!k.f) {
          break label82;
        }
      }
    }
    if (paramInt == 1) {
      c(1);
    }
    label82:
    this.P = paramInt;
  }
  
  protected k a()
  {
    return new k();
  }
  
  public k s()
  {
    if (k.g == 0) {
      if (this.V == null) {
        this.V = a();
      }
    }
    return this.V;
  }
  
  public void a(k paramk)
  {
    if (paramk == null) {
      throw new NullPointerException();
    }
    this.V = paramk;
  }
  
  public void h(boolean paramBoolean)
  {
    this.T = paramBoolean;
    i(this.S);
  }
  
  public boolean t()
  {
    int i = k.g;
    vc localvc = b();
    if (i == 0) {
      if ((localvc instanceof pc)) {
        return ((pc)localvc).h();
      }
    }
    if (i == 0) {
      if (this.T) {
        throw new IllegalStateException("No LabelLayoutTranslator registered");
      }
    }
    return false;
  }
  
  public void i(boolean paramBoolean)
  {
    int i = k.g;
    this.S = paramBoolean;
    if (i == 0)
    {
      if (!this.S)
      {
        if (i != 0) {
          break label104;
        }
        if (!this.T) {}
      }
      else
      {
        d(this.U);
      }
    }
    else
    {
      vc localvc = b();
      if (i == 0)
      {
        if ((localvc instanceof pc))
        {
          ((pc)localvc).g(this.S);
          ((pc)localvc).d(this.S);
          ((pc)localvc).f(this.T);
        }
        if (i != 0) {
          break label105;
        }
        c(true);
      }
      if (!k.f) {
        return;
      }
    }
    label104:
    label105:
    c(false);
  }
  
  public boolean u()
  {
    int i = k.g;
    vc localvc = b();
    if (i == 0) {
      if ((localvc instanceof pc))
      {
        if ((i != 0) || (((pc)localvc).i())) {
          if (i != 0) {}
        }
        return ((pc)localvc).f();
      }
    }
    if (i == 0) {
      if (this.S) {
        throw new IllegalStateException("No LabelLayoutTranslator registered");
      }
    }
    return false;
  }
  
  public int v()
  {
    return this.P;
  }
  
  public j()
  {
    f(false);
    b(false);
    vc localvc = g();
    if ((k.g != 0) || ((localvc instanceof a.f.c.c))) {
      ((a.f.c.c)localvc).a(false);
    }
    cb localcb = new cb();
    localcb.a(false);
    j(localcb);
  }
  
  public void j(boolean paramBoolean)
  {
    this.K = paramBoolean;
  }
  
  public boolean w()
  {
    return this.K;
  }
  
  public void k(boolean paramBoolean)
  {
    this.M = paramBoolean;
  }
  
  public boolean x()
  {
    return this.M;
  }
  
  public void l(boolean paramBoolean)
  {
    this.J = paramBoolean;
  }
  
  public boolean y()
  {
    return this.J;
  }
  
  public boolean z()
  {
    return this.R;
  }
  
  public void m(boolean paramBoolean)
  {
    this.R = paramBoolean;
  }
  
  public void b(int paramInt)
  {
    if (paramInt < 1) {
      throw new IllegalArgumentException("Illegal value for grid size: " + paramInt);
    }
    this.H = paramInt;
  }
  
  public int A()
  {
    return this.H;
  }
  
  public void c(int paramInt)
  {
    if (((k.g == 0) && (paramInt < 0)) || (paramInt > 6)) {
      throw new IllegalArgumentException("Illegal value for layout style: " + paramInt);
    }
    this.G = paramInt;
  }
  
  public int B()
  {
    return this.G;
  }
  
  public void n(boolean paramBoolean) {}
  
  public boolean C()
  {
    return false;
  }
  
  public void o(boolean paramBoolean)
  {
    this.I = paramBoolean;
  }
  
  public boolean D()
  {
    return this.I;
  }
  
  public boolean F()
  {
    return this.L;
  }
  
  public void p(boolean paramBoolean)
  {
    this.L = paramBoolean;
  }
  
  public void q(boolean paramBoolean)
  {
    this.Q = paramBoolean;
  }
  
  public boolean b(a.f.o paramo)
  {
    return true;
  }
  
  public void a(a.f.o paramo)
  {
    int j = k.g;
    boolean bool = k.f;
    a.f.h.b.a locala = new a.f.h.b.a();
    locala.a(this.H);
    locala.a(s());
    n localn = null;
    x localx = null;
    Object localObject1 = null;
    Object localObject2 = null;
    Object localObject3 = null;
    Object localObject4 = null;
    if (j == 0) {
      if (this.G != 0)
      {
        if (j != 0) {
          break label90;
        }
        if (this.G != 4) {
          if (j != 0) {
            break label90;
          }
        }
      }
    }
    label90:
    int i = this.G == 1 ? 1 : 0;
    if (j == 0) {
      if (i != 0) {
        locala.a(new a.f.h.d.b());
      }
    }
    Object localObject5;
    if (this.G == 4)
    {
      localObject5 = new a_();
      ((a_)localObject5).c(a.f.n.b.B);
      ((a_)localObject5).b(Math.max(this.H, 10));
      ((a_)localObject5).a(Math.max(this.H, 10));
      ((a_)localObject5).d(Math.max(this.H, 20));
      ((a_)localObject5).q();
      jb localjb = new jb((rc)localObject5);
      if (j == 0) {}
      localjb.a(!F());
      locala.b(localjb);
      locala.h(true);
      if (j != 0) {
        break label274;
      }
      if (bool)
      {
        if (j == 0) {}
        a.c.q.n = !a.c.q.n;
      }
    }
    else
    {
      locala.h(false);
    }
    if (this.L)
    {
      label274:
      localn = paramo.C();
      localx = paramo.B();
      a(paramo, localx, localn);
      localObject5 = new a.f.j.h();
      ((a.f.j.h)localObject5).a(localn);
      ((a.f.j.h)localObject5).a(localx);
      localObject1 = localObject5;
      if (j == 0) {
        if (i != 0)
        {
          ((a.f.j.h)localObject5).a(true);
          if (j != 0) {
            break label427;
          }
          if (!bool) {}
        }
        else
        {
          ((a.f.j.h)localObject5).a(false);
        }
      }
    }
    else
    {
      localObject5 = new a.f.j.f();
      ((a.f.j.f)localObject5).a(-1);
      if (j == 0) {}
      ((a.f.j.f)localObject5).b(!this.M);
      ((a.f.j.f)localObject5).d(this.K);
      ((a.f.j.f)localObject5).a(this.J);
      ((a.f.j.f)localObject5).c(this.M);
      localObject1 = localObject5;
    }
    label427:
    if ((j != 0) || (i != 0))
    {
      if (this.L)
      {
        localObject5 = new r();
        ((r)localObject5).a(localn);
        localObject2 = localObject5;
      }
      else
      {
        localObject5 = new a.f.h.d.j();
        ((a.f.h.d.j)localObject5).b(z());
        localObject2 = localObject5;
      }
    }
    else
    {
      localObject5 = new d();
      ((d)localObject5).a(z());
      localObject2 = localObject5;
    }
    if (j == 0) {
      if (i != 0)
      {
        localObject5 = new a.f.h.d.o();
        ((a.f.h.d.o)localObject5).b(false);
        paramo.a(a.f.h.d.o.t, a.i.q.a(new Integer(5)));
        if (j == 0) {
          switch (this.G)
          {
          case 0: 
          case 4: 
            ((a.f.h.d.o)localObject5).a((short)0);
            if (j == 0) {
              if (!bool) {
                break;
              }
            }
            break;
          case 1: 
            ((a.f.h.d.o)localObject5).a((short)1);
          }
        }
        if (j == 0)
        {
          if (this.Q)
          {
            ((a.f.h.d.o)localObject5).a((short)3);
            ((a.f.h.d.o)localObject5).a(new a.f.h.c.h());
            ((a.f.h.d.o)localObject5).b(true);
          }
          if (j == 0) {
            ((a.f.h.d.o)localObject5).b((short)0);
          }
        }
        else if (this.I)
        {
          if (j != 0) {
            break label696;
          }
          ((a.f.h.d.o)localObject5).b(2);
          if (!bool) {
            break label694;
          }
        }
        ((a.f.h.d.o)localObject5).b(3);
        label694:
        label696:
        localObject3 = localObject5;
        break label864;
      }
    }
    if ((j != 0) || (B() != 2))
    {
      if (j != 0) {
        break label795;
      }
      if (B() != 3) {}
    }
    else
    {
      localObject5 = new a.f.h.e.f();
      if (j == 0)
      {
        ((a.f.h.e.f)localObject5).b((short)0);
        if (this.I)
        {
          ((a.f.h.e.f)localObject5).b(2);
          if (j != 0) {
            break label782;
          }
          if (!bool) {
            break label776;
          }
        }
      }
      ((a.f.h.e.f)localObject5).b(3);
      label776:
      ((a.f.h.e.f)localObject5).a((short)0);
      label782:
      localObject3 = localObject5;
      break label864;
    }
    label795:
    if ((j != 0) || ((B() == 6) || (B() == 5)))
    {
      localObject5 = new a.f.h.e.e();
      if (j == 0)
      {
        ((a.f.h.e.e)localObject5).a((short)0);
        if (this.I)
        {
          if (j != 0) {
            break label862;
          }
          ((a.f.h.e.e)localObject5).b(2);
          if (!bool) {
            break label860;
          }
        }
      }
      ((a.f.h.e.e)localObject5).b(3);
      label860:
      label862:
      localObject3 = localObject5;
    }
    label864:
    if ((j != 0) || (B() != 2))
    {
      if (j != 0) {
        break label947;
      }
      if (B() != 3) {}
    }
    else
    {
      localObject5 = new a.f.h.e.c();
      if (j == 0)
      {
        if (B() == 3)
        {
          if (j != 0) {
            break label936;
          }
          ((a.f.h.e.c)localObject5).a((short)1);
        }
      }
      else {
        if (!bool) {
          break label934;
        }
      }
      ((a.f.h.e.c)localObject5).a((short)0);
      localObject4 = localObject5;
      break label1011;
    }
    label934:
    label936:
    label947:
    if ((j != 0) || ((this.G == 6) || (this.G == 5)))
    {
      localObject5 = new a.f.h.e.a();
      if (j == 0)
      {
        if (B() == 5)
        {
          if (j != 0) {
            break label1009;
          }
          ((a.f.h.e.a)localObject5).a((short)2);
        }
      }
      else {
        if (!bool) {
          break label1007;
        }
      }
      ((a.f.h.e.a)localObject5).a((short)3);
      label1007:
      label1009:
      localObject4 = localObject5;
    }
    label1011:
    locala.a(localObject1);
    locala.a(localObject2);
    locala.a(localObject3);
    locala.a(localObject4);
    if (j == 0) {
      if (i == 0) {
        locala.h(false);
      }
    }
    if (j == 0) {
      if (i == 0) {
        locala.i(false);
      }
    }
    if (i != 0)
    {
      locala.j(paramo.c(oc.a) != null);
      if (!bool) {}
    }
    else
    {
      locala.j(false);
    }
    if (paramo.c(oc.b) != null) {
      if (j == 0) {
        if (this.G != 0) {
          if (j != 0) {
            break label1136;
          }
        }
      }
    }
    label1136:
    locala.k(this.G == 4);
    if (j == 0)
    {
      if ((e() instanceof t))
      {
        localObject5 = (t)e();
        ((t)localObject5).a(A());
        ((t)localObject5).b(0.0D);
      }
      locala.q();
      locala.doLayout(paramo);
    }
    if (j == 0) {
      if (this.L)
      {
        paramo.a(localn);
        paramo.a(localx);
      }
    }
    if (i != 0) {
      paramo.j(a.f.h.d.o.t);
    }
    new hb().doLayout(paramo);
    if (j != 0) {
      a.c.q.o = !a.c.q.o;
    }
  }
  
  private void a(a.f.o paramo, x paramx, n paramn)
  {
    int i = k.g;
    boolean bool = k.f;
    a.c.k localk = paramo.c(x);
    Object localObject2;
    if (localk != null)
    {
      localObject1 = paramo.w();
      do
      {
        if (!((m)localObject1).e()) {
          break;
        }
        localObject2 = ((m)localObject1).a();
        if (i == 0)
        {
          if (bool) {
            break label95;
          }
          paramn.a(localObject2, localk.getBool(localObject2));
          ((m)localObject1).f();
        }
      } while (!bool);
    }
    label95:
    Object localObject1 = paramo.c(w);
    if (localObject1 != null)
    {
      localObject2 = paramo.v();
      do
      {
        if (!((w)localObject2).e()) {
          break;
        }
        a.c.e locale = ((w)localObject2).d();
        paramx.a(locale, ((a.c.k)localObject1).getBool(locale));
        ((w)localObject2).f();
      } while (!bool);
    }
  }
  
  static class a_
    extends a.f.n.b
  {
    public void a(a.f.o paramo)
    {
      a.c.e locale = kb.h(paramo);
      super.a(paramo);
      double d1 = -paramo.m(locale);
      double d2 = -paramo.n(locale);
      wc.b(paramo, paramo.v(), d1, d2);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.h.j

 * JD-Core Version:    0.7.0.1

 */